#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
void fun(int a, int b, long* c)
{
    int x, y, z, u;
    x = a / 10 * 10;
    y = a % 10 * 1000;
    z = b / 10 * 100;
    u = b % 10;
    *c = x + y + u + z;
}
void main()
{
    int a, b;
    long c;
    scanf("%d%d", &a, &b);
    fun(a, b, &c);
    printf("%ld\n", c);
}



